package peer.share;

import java.io.File;
import java.util.HashMap;

public class ShareFileList {
	HashMap<String, String> shareFileTable;
	ShareFileList(){
		shareFileTable=new HashMap<String, String>();
	}
	
	
	void addShareFile(File file,String mds){
		addShareFile(file.getAbsolutePath(),mds);
	}
	
	void addShareFile(String filePath,String mds){
		shareFileTable.put(filePath, mds);
	}
	
	void removeShareFile(String filePath){
		shareFileTable.remove(filePath);
	}
	
	boolean containsShareFile(String filePath){
		return shareFileTable.containsKey(filePath);
	}
	
	boolean containsShareFile(File file){
		return shareFileTable.containsKey(file.getAbsolutePath());
	}
	
	HashMap<String, String> getHM(){
		return shareFileTable;
	}
	
	String getMds(String filePath){
		return shareFileTable.get(filePath);
	}
	
}
